<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%><%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<s:include value="/WEB-INF/includes/css.jsp" />
	<s:include value="/WEB-INF/includes/javascript.jsp" />
	<title><s:text name="title" /></title>
</head>
<body>
	<div id="container">
		<s:include value="/WEB-INF/includes/header.jsp" />
		<div id="content">
			<div id="content-nav">
				<div class="optmenu rounded">
					<h3 class="rounded-top"><s:text name="actions" /></h3>
					<div class="optmenu-body">
						<ul>
							<li>
								<a href="<s:url action="new-discussion" namespace="/" />">
									<s:text name="new-discussion" />
								</a>
							</li>
						</ul>
					</div>
				</div>
				<s:if test="categories.size() > 0">
					<div class="optmenu rounded">
						<h3 class="rounded-top"><s:text name="categories" /></h3>
						<div class="optmenu-body">
							<ul><s:iterator value="categories">
								<li>
									<a href="<s:url action="category"><s:param name="id" value="id" /></s:url>">
										<s:property value="name"/>
									</a>
								</li>
							</s:iterator></ul>
						</div>
					</div>
				</s:if>
			</div>
			<div id="content-body">
				<s:if test="actionErrors.size() > 0">
					<div class="error rounded">
						<s:iterator value="actionErrors"><s:property /><br /></s:iterator>
					</div>
				</s:if>
				<s:form label="%{getText('new-discussion.form.label')}" action="create-discussion" validate="true" cssClass="fixed">
	            	<s:if test="categoryId == null">
	            		<s:select key="categoryId" list="categories" listKey="id" listValue="name" cssClass="txt" />
	            	</s:if><s:else>
	            		<s:hidden name="categoryId" />
	            	</s:else>
	            	<s:textfield key="subject" required="true" cssClass="txt" />
	            	<s:textarea name="body" required="true" cssClass="txt" />
	            	<div class="field"><s:submit value="%{getText('new-discussion.form.save')}"/></div>
	            </s:form>
			</div>
			<div class="clear">&nbsp;</div>
		</div>
		<s:include value="/WEB-INF/includes/footer.jsp" />
	</div>
</body>
</html>
